import http from '@/http/http'
enum Api {
    reportRectify = '/manage/admin/reportRectify/allocationReport',
    getRectifyUser = '/manage/admin/userInfo/getRectifyUser',
    refuseMessage='/manage/admin/reportRectify/reject',
    postVisit = '/manage/admin/reportRectify/visit',
    bindFileUrl = '/manage/upload/bindFileUrl',
    getMyTown = '/manage/admin/pubAreaInfo/getMyTownList',
    getUnitList = '/manage/admin/unitInfo/unitList',
    reportRectifyNew = '/manage/admin/reportRectify/dispatch',
    reportRectifyNew2 = '/manage/admin/reportRectify/dispatchAgain',
    notTread = '/manage/admin/reportRectify/notTread',
    finish = '/manage/admin/reportRectify/finish',
    back = '/manage/admin/reportRectify/back',
    getRectify = '/manage/admin/userInfo/getRectifyUser',
    qianshou = '/manage/admin/reportRectify/sign',
    delayApp = '/manage/admin/reportRectify/delayApply',
    approve = '/manage/admin/reportProgress/approve',
  add = '/manage/admin/reportRectify/add',
  selectAccept = '/manage/admin/unitInfo/selectAccept',
  recover = '/manage/admin/reportRectify/recover',
    reward='/manage/admin/reportRectify/reward'
}
//隐患分配
export const reportRectifyApi = async (params: any) => {
  return await http.put(Api.reportRectify, params)
}
// 有奖举报
export const addApi = async (params: any) => {
  return await http.post(Api.add, params)
}
// 审批
export const approveApi = async (params: any) => {
  return await http.post(Api.approve, params)
}
// 再次分配 市级
export const dispatchAgainApi = async (params: any) => {
  return await http.put(Api.reportRectifyNew2, params)
}

//隐患分配新的
export const reportRectifyNewApi = async (params: any) => {
  return await http.put(Api.reportRectifyNew, params)
}
// 再次分配 镇级
export const reportRectifyNew2Api = async (params: any) => {
  return await http.put(Api.reportRectifyNew2, params)
}

// 不予立案
export const notTreadApi = async (params: any) => {
  return await http.put(Api.notTread, params)
}

// 终止
export const finishApi = async (params: any) => {
  return await http.put(Api.finish, params)
}

// 退回
export const backApi = async (params: any) => {
  return await http.put(Api.back, params)
}

// 镇级 下拉人员
export const getRectifyApi = async (params: any) => {
  return await http.post(Api.getRectify, params)
}
// 乡镇下拉
export const getMyTownApi = async () => {
  return await http.getUrl(Api.getMyTown)
}

// 再次分配下拉
export const getSelectAcceptApi = async () => {
  return await http.getUrl(Api.selectAccept)
}


// 市级直属部门下拉
export const getUnitListApi = async () => {
  return await http.getUrl(Api.getUnitList)
}

//获取数据原持有人列表
export const getRectifyUserApi = async (params: any) => {
  return await http.getUrl(Api.getRectifyUser, params)
}

// 延期申请
export const delayAppApi = async (params: any) => {
  return await http.put(Api.delayApp, params)
}


// 驳回
export const refuseMessageApi = async (params: any) => {
  return await http.put(Api.refuseMessage, params)
}
// 收回
export const recoverApi = async (params: any) => {
  return await http.put(Api.recover, params)
}
// 话费奖励 
export const rewardApi = async (params: any) => {
  return await http.put(Api.reward, params)
}

// 签收
export const qianshouApi = async (params: any) => {
  return await http.put(Api.qianshou, params)
}

// 回访
export const postVisitApi = async (params: any) => {
  return await http.put(Api.postVisit, params)
}

// 获取完整路径
export const bindFileUrlApi = async (params: any) => {
  return await http.getUrl(`${Api.bindFileUrl}?fileUrl=${params.fileUrl}`)
}